let nextTodoId = 0;
const actions = {
  setVisibilityFilter: (filter) => {
    return {
      type: "SET_VISIBILITY_FILTER",
      filter,
    };
  },
  addTodo: (text) => {
    return { type: "ADD_TODO", id: nextTodoId++, text };
  },
  toggleTodo: (id) => {
    return {
      type: "TOGGLE_TODO",
      id,
    };
  },
};
export default actions;
